/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include <iostream>
#include <基本类型.h>
#include <向量.h>
#include <线性代数/几何计算.h>

#include "引擎数据类型.h"



typedef struct {
	//cudaPitchedPtr m_体素索引;
	S_域区	m_域属性;

	uint32* m_邻接索引_Key;
	uint32*	m_邻接索引_Value;
	uint8*	m_单元内邻接数量;
	vec3*	m_TempVert;

	uint32*	m_体素索引;
	//vec3	m_Offset;
	uint64	m_Num;
	uint64	m_体素Num;
	//float32	m_单元大小;
	//uvec3	m_Dim;
	

}S_邻接数据;




void ouf_分配单元区间GPU内存(S_邻接数据& data);


void cuf_分类邻接单元(S_邻接数据& data, vec3* loc, uint32 线程块大小);
//void cuf_排序邻接单元(S_邻接数据& data, vec3* loc);
void buf_数据拷贝回内存(uint32* index, uint8* iNum, uint32* v, S_邻接数据& data);





